#include "AIInterfaceImp.h"

#include <boost/thread/locks.hpp>

namespace OOInterface
{

AIInterfaceImp::AIInterfaceImp() : _listeners()
{
}

AIInterfaceImp::~AIInterfaceImp()
{
}

void AIInterfaceImp::addGameListener( GameListener* listener)
{
	_listeners.push_back( listener );
}

void AIInterfaceImp::removeGameListener( GameListener* listener )
{
	_listeners.remove( listener );
}

void AIInterfaceImp::processGameEvent( ConstGameEventPtr event )
{
	for( ListenersList::iterator listener = _listeners.begin(); listener != _listeners.end(); ++listener )
	{
		(*listener)->handle( event );
	}
}

}
